package main

import "fmt"

/* 声明与赋值 */

// 全局变量
var n7 = 100
var n8 = 200
// 一次性声明
var (
	age  int    = 44
	name string = "robert"
)

func main() { //支持推导,默认值
	var num int = 18
	fmt.Println(num)
	var num1 int
	fmt.Println(num1)
	var num2 = 33
	fmt.Println(num2)
	num3 := 188
	fmt.Println(num3)

	// 一行声明多个变量
	var n1, n2, n3 int
	fmt.Println(n1)
	fmt.Println(n2)
	fmt.Println(n3)

	var n11, n22, n33 int = 1, 2, 3
	fmt.Println(n11)
	fmt.Println(n22)
	fmt.Println(n33)

	var age , name= 44, "tony"
	fmt.Println(age)
	fmt.Printf("age's type:%T\n",age)
	fmt.Println(name)

	width, height := 6.9, 16.8
	fmt.Println(width)
	fmt.Println(height)
	var a2 , a3 int32
  a2 =3;a3=4
	fmt.Println(a2,a3)
	test(1, 55)
}

func test(a ,b int){
  fmt.Println(a,b)
}
